count_dictionary = 3
dictionary_word = []
for i in range(count_dictionary):
    word = input()
    dictionary_word.append(word)
copy_dictionary_word = set()
for i in dictionary_word:
    copy_dictionary_word.add(i.lower())

count_check = 2
checking_words = set()


for i in range(count_check):
    verification_word = input().split()
    for j in verification_word:
        checking_words.add(j)

for i in checking_words:
    if i.lower() not in copy_dictionary_word:
        print(i)
